import service from '@/server'


export const register = (params) => {
    return service({
        url: '/system/auth/register',
        method: 'post',
        data: params,
        setting: {
            json: true
        }
    })
}

export const login = (params) => {
    return service({
        url: '/system/auth/login',
        method: 'post',
        data: params,
        setting: {
            json: true
        }
    })
}

export const logout = () => {
    return service({
        url: '/system/auth/logout',
        method: 'post',
        setting: {
            json: true,
            isToken: true
        }
    })
}

export const refreshToken = (params) => {
    return service({
        url: '/system/auth/refresh',
        method: 'post',
        data: params,
        setting: {
            json: true
        }
    })
}